import java.util.Scanner;

public class Test0507 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        char[] c=in.next().toCharArray();
        char[] c1=new char[2*c.length-1];
        for(int i=0;i<c1.length;i++) {
        	if(i<c.length-1) {
        		c1[i]=c[i];
        	}else {
        		c1[i]=c[c1.length-i-1];
        	}
        }
        StringBuffer s=new StringBuffer("");
        for(int i=0;i<c1.length;i++) {
        	s.append(c1[i]);
        }
//        System.out.println(s.toString());
        int ret=Integer.parseInt(s.toString());
        if(iszhi(ret)) {
        	System.out.println("prime");
        }else {
        	System.out.println("noprime");
        }
    }
    static boolean iszhi(int ret) {
    	for(int i=2;i<ret;i++) {
    		if(ret%i==0) {
    			return false;
    		}
    	}
    	return true;
    }
}
